package xx.iverson.navigation_manager.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xx.iverson.navigation_manager.entity.NavCategory;
import xx.iverson.navigation_manager.mapper.NavCategoryMapper;
import xx.iverson.navigation_manager.service.NavCategoryService;

import java.util.List;
/**
 * xx.iverson.navigation_manager.service.impl.NavCategoryServiceImpl
 * 描述：
 * on 2025/9/11-下午4:25
 *
 * @author weijx
 */


@Service
public class NavCategoryServiceImpl implements NavCategoryService {

    @Autowired
    private NavCategoryMapper categoryMapper;

    @Override
    public List<NavCategory> findAll() {
        return categoryMapper.findAll();
    }

    @Override
    public NavCategory findById(Integer id) {
        return categoryMapper.findById(id);
    }

    @Override
    public int add(NavCategory category) {
        return categoryMapper.insert(category);
    }

    @Override
    public int update(NavCategory category) {
        return categoryMapper.update(category);
    }

    @Override
    public int delete(Integer id) {
        return categoryMapper.delete(id);
    }
}
